home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-02 | 8.0 KB | 396 lines | [TEXT/KAHL] |
- /*
- * DTSSampleCSAMTemplate.r
- * Copyright © 1992-93 Apple Computer Inc. All Rights Reserved.
- *
- * This file contains the template-specific resources for the
- * DTS Sample CSAM. It is included by DTSSampleCSAM.r
- */
- #include "OCETemplates.h"
-
- /*
- * These three strings must be unique throughout the AOCE environment.
- * By convention, the creator id is appended to a defined string.
- */
- #define kServiceRecordType kDirectoryRecTypeBody kCSAMCreatorIDString
- #define kAspectName "Aspect " kCSAMCreatorIDString
-
- /*
- * Resource file definitions
- */
- #if Think_Rez == 0
- #define kTemplateCodeFile "::Obj:DTSSampleTemplate.code"
- #define kIconResourceFile "::DTSSampleIcons"
- #else
- #define kIconResourceFile "DTSSampleIcons"
- #endif
- /*
- * These are the resource id's of the "original" icons in kIconResourceFile.
- * They will be included using AOCE-specific resource id numbers.
- */
- #define kIconID 129 /* In Icon file */
-
- /*
- * The CSAM's name is used to name the CSAM's record.
- */
- resource 'STR ' (
- kCSAMName,
- kTemplateName " Name",
- purgeable ) {
- kTemplateName " Catalog" /* "DTS Sample Catalog" */
- };
-
- /*
- * SAM Property default values. This tells OCE that we
- * only serve a CSAM, and that we are always active.
- */
- resource 'sami' (
- kCSAMAspect + kSAMAspectSlotCreationInfo,
- kTemplateName " SAM Slot Creation Info",
- purgeable
- ) {
- 0, /* Any number of directories */
- kCSAMCreatorID, /* My registered creator id */
- notMSAM, /* Doesn't serve an MSAM */
- servesDSAM, /* Serves a CSAM */
- "Sample Personal Catalog",
- "Untitled Personal Catalog"
- };
-
- /*
- * Sample Directory CSAM Aspect
- */
- resource 'deta' (
- kCSAMAspect,
- kTemplateName " Aspect",
- purgeable
- ) {
- 0, dropCheckConflicts, isMainAspect /* , enabled -- Not in 1.0A14 build */
- };
-
- resource 'rstr' (
- kCSAMAspect + kDETTemplateName,
- kTemplateName " Aspect Name",
- purgeable
- ) {
- kAspectName /* Unique throughout system */
- };
-
- resource 'rstr' (
- kCSAMAspect + kDETRecordType,
- kTemplateName " Record Type",
- purgeable
- ) {
- kServiceRecordType /* Unique throughout system */
- };
-
- resource 'rstr' (
- kCSAMAspect + kDETAspectKind,
- kTemplateName " Kind",
- purgeable
- ) {
- kTemplateName "Sample Personal Catalog"
- };
-
- resource 'rstr' (
- kCSAMAspect + kSAMAspectKind,
- kTemplateName " Kind",
- purgeable
- ) {
- kTemplateName "Sample Personal Catalog"
- };
-
- resource 'rstr' (
- kCSAMAspect + kDETAspectName,
- kTemplateName " Name",
- purgeable
- ) {
- "Untitled Personal Catalog"
- };
-
- resource 'rstr' (
- kCSAMAspect + kSAMAspectUserName,
- kTemplateName " Name",
- purgeable
- ) {
- "CSAM User"
- };
-
- #if Think_Rez == 0
- /*
- * The template is managed by a code segment. This is the
- * result of compiling DTS_CSAMTemplate.c and DETUtilities.c
- * (see the Makefile for details). This is used only by MPW.
- */
- include kTemplateCodeFile 'detc'(0) as 'detc' (
- kCSAMAspect + kDETAspectCode,
- kTemplateName,
- purgeable
- );
- #endif
-
- /*
- * This is a balloon help string.
- */
- resource 'rstr' (
- kCSAMAspect + kDETAspectWhatIs,
- kTemplateName " WhatIs",
- purgeable
- ) {
- "Open this Sample Personal Catalog to see which"
- " Personal Catalog it is bound to."
- };
-
- /*
- * Here are more balloons.
- */
- resource 'rst#' (
- kCSAMAspect + kDETAspectBalloons,
- kTemplateName " Balloons",
- purgeable
- ) {
- {
- "Click this to set whether or not the catalog is active.",
- "ERROR",
- "Press this button to create a Personal Catalog that"
- " will be bound to this Sample Catalog.",
- "ERROR"
- }
- };
-
- resource 'dett' (
- kCSAMAspect + kDETAspectLookup,
- kTemplateName " Lookup Table",
- purgeable
- ) {
- {
- { kPDAliasAttrTypeBody },
- typeBinary,
- useForInput,
- useForOutput,
- notInSublist,
- isNotAlias,
- isNotRecordRef,
- {
- 'p:=p', prHasCatalog, kDETOneProperty;
- 'btyp', kDETNoProperty, 1;
- 'rest', prPDAlias, 0
- }
- }
- };
-
- /*
- * Aspect icons
- */
- include kIconResourceFile 'ICN#' (kIconID) as 'ICN#' (
- kCSAMAspect + kDETAspectMainBitmap,
- kTemplateName,
- purgeable
- );
- include kIconResourceFile 'ics#' (kIconID) as 'ics#' (
- kCSAMAspect + kDETAspectMainBitmap,
- kTemplateName,
- purgeable
- );
- include kIconResourceFile 'SICN' (kIconID) as 'SICN' (
- kCSAMAspect + kDETAspectMainBitmap,
- kTemplateName,
- purgeable
- );
- include kIconResourceFile 'icl8' (kIconID) as 'icl8' (
- kCSAMAspect + kDETAspectMainBitmap,
- kTemplateName,
- purgeable
- );
- include kIconResourceFile 'ics8' (kIconID) as 'ics8' (
- kCSAMAspect + kDETAspectMainBitmap,
- kTemplateName,
- purgeable
- );
- include kIconResourceFile 'icl4' (kIconID) as 'icl4' (
- kCSAMAspect + kDETAspectMainBitmap,
- kTemplateName,
- purgeable
- );
- include kIconResourceFile 'ics4' (kIconID) as 'ics4' (
- kCSAMAspect + kDETAspectMainBitmap,
- kTemplateName,
- purgeable
- );
-
- /*
- * Organize the appearance of the
- * Personal Directory CSAM Info Page
- */
- #define kBorderRect { \
- 45, \
- 0, \
- 46, \
- kDETRecordInfoWindWidth \
- }
- #define kPDMessageRect { \
- 56, \
- 12, \
- 56 + (2 * kDETAppFontLineHeight), \
- kDETRecordInfoWindWidth - 12 \
- }
- #define kSetPDButtonRect { \
- 56 + (3 * kDETAppFontLineHeight), \
- 130, \
- 76 + (3 * kDETAppFontLineHeight), \
- 275 \
- }
- #define kPDRect { \
- 56 + (2 * kDETAppFontLineHeight), \
- 12, \
- 56 + (4 * kDETAppFontLineHeight), \
- kDETRecordInfoWindWidth - 12 \
- }
- #define kActiveButtonRect { \
- 56 + (5 * kDETAppFontLineHeight), \
- 30, \
- 76 + (5 * kDETAppFontLineHeight), \
- 100 \
- }
-
- resource 'deti' (
- kCSAMInfoPage,
- kTemplateName,
- purgeable
- ) {
- 1000, /* Sort order magic constant */
- {0, 0, 0, 0},
- noSelectFirstText,
- {
- kDETNoProperty, kDETNoProperty, kCSAMInfoPage;
- prHasCatalog, kDETZeroProperty, kCSAMInfoPage + 1;
- prHasCatalog, kDETOneProperty, kCSAMInfoPage + 2;
- },
- {
- }
- };
-
- resource 'rstr' (
- kCSAMInfoPage + kDETTemplateName,
- kTemplateName " Info Page Name",
- purgeable
- ) {
- kTemplateName " Info Page"
- };
-
-
- resource 'rstr' (
- kCSAMInfoPage + kDETRecordType,
- kTemplateName " Info Page Record Type",
- purgeable
- ) {
- kServiceRecordType /* Unique throughout system */
- };
-
- resource 'rstr' (
- kCSAMInfoPage + kDETInfoPageName,
- kTemplateName " Info Page Name",
- purgeable
- ) {
- /*
- * Readable text
- */
- kTemplateName
- };
-
- resource 'rstr' (
- kCSAMInfoPage + kDETInfoPageMainViewAspect,
- kTemplateName " Info Page Main View Aspect",
- purgeable
- ) {
- kAspectName /* Unique throughout system */
- };
-
- resource 'detv' (
- kCSAMInfoPage,
- kTemplateName " Common",
- purgeable
- ) {
- {
- kDETSubpageIconRect,
- kDETNoFlags,
- kDETAspectMainBitmap,
- Bitmap { kDETLargeIcon };
- kBorderRect,
- kDETNoFlags,
- kDETNoProperty,
- Box { kDETBoxIsGrayed };
- }
- };
-
- resource 'detv' (
- kCSAMInfoPage + 1,
- kTemplateName " Unconfigured",
- purgeable
- ) {
- {
- kPDMessageRect,
- kDETNoFlags,
- kDETNoProperty,
- StaticTextFromView {
- kDETApplicationFont,
- kDETApplicationFontSize,
- kDETCenter,
- kDETBold,
- "This catalog is not bound to a Personal Catalog."
- };
- kSetPDButtonRect,
- kDETNoFlags,
- prCreatePDButton,
- Button {
- kDETSystemFont,
- kDETSystemFontSize,
- kDETCenter,
- kDETNormal,
- "Create Catalog",
- prCreatePDButton
- };
- }
- };
-
- resource 'detv' (
- kCSAMInfoPage + 2,
- kTemplateName " Configured",
- purgeable
- ) {
- {
- kPDMessageRect,
- kDETNoFlags,
- kDETNoProperty,
- StaticTextFromView {
- kDETApplicationFont,
- kDETApplicationFontSize,
- kDETCenter,
- kDETBold,
- "This catalog is bound to the"
- " following Personal Catalog:"
- };
- kPDRect,
- kDETNoFlags + kDETMultiLine,
- prPDAlias,
- StaticText {
- kDETApplicationFont,
- kDETApplicationFontSize,
- kDETCenter,
- kDETNormal
- };
- }
- };
-
- /*
- * Template prompt strings
- */
- resource 'STR#' (
- kCSAMPromptStrings,
- kTemplateName " Standard File Prompt Strings",
- purgeable
- ) {
- {
- "Create the Personal Catalog as", /* kNewPDPrompt */
- "Personal Catalog" /* kNewPDName */
- }
- };